package com.aerospace.springcloud.service.impl;

import com.aerospace.springcloud.dao.PaymentDao;
import com.aerospace.springcloud.entities.Payment;
import com.aerospace.springcloud.service.PaymentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author: Aerospace
 * @Date: 2021/4/15 3:36
 * @Description: Dream begins
 */
@Service
public class PaymentServiceImpl implements PaymentService {
    @Resource
    PaymentDao paymentDao;

    /**
     * 新增
     * @param payment
     * @return
     */
    @Override
    public int create(Payment payment) {
        return paymentDao.create(payment);
    }

    /**
     * 根据id查询
     * @param id
     * @return
     */
    @Override
    public Payment getPaymentById(Long id) {
        return paymentDao.getPaymentById(id);
    }
}
